import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Scanner;

/**
 * @Author: biubiu0002
 * @Date: 2021-12-25 9:16
 **/
public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
//        int n = scanner.nextInt();
        solution(s);
    }

    public static void solution(String s) {
        Map<Character,Integer> map = new LinkedHashMap<>();
        char[] chars = s.toCharArray();
        int length = chars.length;
        for(int i=0;i<length;i++){
            map.put(chars[i],map.getOrDefault(chars[i],0)+1);
        }
        int position =0;
        int maxCount = Integer.MIN_VALUE;
        char res=' ';

        for(int i=0;i<length;i++){
            if(map.get(chars[i])>maxCount){
                maxCount=map.get(chars[i]);
                position=i;
                res = chars[i];
            }

        }
//        System.out.println(res);
        System.out.println("字符=" + res +"次数="+maxCount);



    }
}
